package com.ruoyi.mes.systembasic.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mes.systembasic.mapper.SmesDepartmentMapper;
import com.ruoyi.mes.systembasic.domain.SmesDepartment;
import com.ruoyi.mes.systembasic.service.ISmesDepartmentService;

/**
 * 车间管理Service业务层处理
 *
 * @author simpsense
 * @date 2020-11-30
 */
@Service
public class SmesDepartmentServiceImpl implements ISmesDepartmentService
{
    @Autowired
    private SmesDepartmentMapper smesDepartmentMapper;

    /**
     * 查询车间管理
     *
     * @param departmentId 车间管理ID
     * @return 车间管理
     */
    @Override
    public SmesDepartment selectSmesDepartmentById(Long departmentId)
    {
        return smesDepartmentMapper.selectSmesDepartmentById(departmentId);
    }

    /**
     * 查询车间管理列表
     *
     * @param smesDepartment 车间管理
     * @return 车间管理
     */
    @Override
    public List<SmesDepartment> selectSmesDepartmentList(SmesDepartment smesDepartment)
    {
        return smesDepartmentMapper.selectSmesDepartmentList(smesDepartment);
    }

    /**
     * 新增车间管理
     *
     * @param smesDepartment 车间管理
     * @return 结果
     */
    @Override
    public int insertSmesDepartment(SmesDepartment smesDepartment)
    {
        return smesDepartmentMapper.insertSmesDepartment(smesDepartment);
    }

    /**
     * 修改车间管理
     *
     * @param smesDepartment 车间管理
     * @return 结果
     */
    @Override
    public int updateSmesDepartment(SmesDepartment smesDepartment)
    {
        return smesDepartmentMapper.updateSmesDepartment(smesDepartment);
    }

    /**
     * 批量删除车间管理
     *
     * @param departmentIds 需要删除的车间管理ID
     * @return 结果
     */
    @Override
    public int deleteSmesDepartmentByIds(Long[] departmentIds)
    {
        return smesDepartmentMapper.deleteSmesDepartmentByIds(departmentIds);
    }

    /**
     * 删除车间管理信息
     *
     * @param departmentId 车间管理ID
     * @return 结果
     */
    @Override
    public int deleteSmesDepartmentById(Long departmentId)
    {
        return smesDepartmentMapper.deleteSmesDepartmentById(departmentId);
    }
}